package cn.hx.whh.automaticticket.dialog;

import android.app.Activity;
import android.app.Dialog;
import android.content.DialogInterface;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.LinearLayout;

import cn.hx.whh.automaticticket.R;

public class DialogView { //
    private Dialog dialog;

    public DialogView(Activity mActivity) {
        dialog = new Dialog(mActivity, R.style.mask_dialog);
        LinearLayout popView = (LinearLayout) LayoutInflater.from(mActivity).inflate(R.layout.dialog_view, null);

        dialog.setContentView(popView,
                new LinearLayout.LayoutParams(LinearLayout.LayoutParams.MATCH_PARENT, LinearLayout.LayoutParams.MATCH_PARENT));
        dialog.setFeatureDrawableAlpha(Window.FEATURE_OPTIONS_PANEL, 0);
    }

    public void show() {
        dialog.show();
    }

    public void hide() {
        dialog.dismiss();
    }
}